import request from '@/utils/request'

//import axios from 'axios'
// 登录
export const login = ( {username,password,code,uuid})=>{
 return request({
  method:"post",
  url:"/login",
  data:{
    username:username,
    password:password,
    code:code,
    uuid:uuid
  }
 })
}
export const register = ( {username,password, code,uuid})=>{
  return request({
    method:'post',
    url:'/register',
    data:{
      username:username,
      password:password,
      code:code,
      uuid:uuid
    }
    
  })
}
//验证码
// 导出一个名为captcha的函数
export  const captcha = () =>{
  // 发送一个get请求，请求的url为"/captchaImage"
  return request({
    method:"get",
    url:'/captchaImage'
  }
  )
}

// 获取用户信息
export const getUserInfo = () => {
  return request({
    method: 'get',
    url: '/bl/user'
  })
}